﻿<controls:MetroWindow  x:Class="AesonTesintegrationModul.TestApp.Views.MainViews.MainWindows"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:prism="clr-namespace:Microsoft.Practices.Prism.Mvvm;assembly=Microsoft.Practices.Prism.Mvvm.Desktop"
        xmlns:config="clr-namespace:AesonTesintegrationModul.TestApp.Config"
        prism:ViewModelLocator.AutoWireViewModel="True" WindowStartupLocation="CenterOwner" WindowState="Maximized"
        xmlns:regions="http://www.codeplex.com/CompositeWPF"
        Title="{x:Static config:AppConfig.ApplicationTitle}" TextBlock.TextAlignment="Center">
    <controls:MetroWindow.InputBindings>
        <KeyBinding Key="L" Modifiers="Control" Command="{Binding ShowConsoleCommand}" ></KeyBinding>
    </controls:MetroWindow.InputBindings>
    <controls:MetroWindow.LeftWindowCommands>
        <controls:WindowCommands>
            <Button FontSize="18" Name="btnMenu" Command="{Binding MainMenuCommand}" >Menu</Button>
            <Button FontSize="18" Name="btnHome" Command="{Binding HomeCommand}"  >Home</Button>
        </controls:WindowCommands>
    </controls:MetroWindow.LeftWindowCommands>
    <controls:MetroWindow.Flyouts>
        <controls:FlyoutsControl>
            <controls:Flyout  Name="TopBar" Margin="0,15,0,0" Height="100" IsOpen="{Binding IsMainMenuOpen, Mode=TwoWay}" Position="Top" >
                <ContentControl  >
                    <Grid>
                        <StackPanel Orientation="Horizontal">
                            <controls:Tile Height="70" Width="145" Title="Accounting" Command="{Binding AccountingMenuCommand}" ></controls:Tile>
                            <controls:Tile Height="70"  Title="Administration" Command="{Binding AdminMenuCommand}" ></controls:Tile>
                        </StackPanel>
                        <controls:FlyoutsControl>
                            <controls:Flyout Header="Accounting" IsOpen="{Binding IsAccountingbarOpen, Mode=TwoWay}" Position="Top" >
                                <ContentControl  >
                                    <StackPanel Orientation="Horizontal">
                                        <controls:Tile Height="73" Background="OrangeRed" Title="Companies" Command="{Binding NavToCompaniesCommand}"  ></controls:Tile>
                                        <controls:Tile Height="73" Background="OrangeRed" Title="Products"  ></controls:Tile>
                                    </StackPanel>
                                </ContentControl>
                            </controls:Flyout>
                        </controls:FlyoutsControl>
                        <controls:FlyoutsControl>
                            <controls:Flyout Header="Administration" IsOpen="{Binding IsAdminbarOpen, Mode=TwoWay}" Position="Top" >
                                <ContentControl  >
                                    <StackPanel Orientation="Horizontal">
                                        <controls:Tile Height="73" Background="OrangeRed" Title="Application User"  ></controls:Tile>
                                        <controls:Tile Height="73" Background="OrangeRed" Title="Application Log"  ></controls:Tile>
                                    </StackPanel>
                                </ContentControl>
                            </controls:Flyout>
                        </controls:FlyoutsControl>
                    </Grid>
                </ContentControl>
            </controls:Flyout>
        </controls:FlyoutsControl>

    </controls:MetroWindow.Flyouts>
    <Grid>
        <ContentControl x:Name="MainContentControl"  regions:RegionManager.RegionName="{x:Static config:RegionNames.MainRegion}" ></ContentControl>
    </Grid>
</controls:MetroWindow>
